09. Pick and Place Demo Walkthrough
Pick and Place Demo Walkthrough
09 L Pick And Place Demo Walkthrough
Once you have properly setup your environment and successfully built the project, you are all set to test the Pick and Place Simulator in demo mode.
First make sure the simulator is set to demo mode by checking that the demo flag is set to true
in inverse_kinematics.launch
file under ~/catkin_ws/src/RoboND-Kinematics-Project/kuka_arm/launch/
Now, you can launch the project by opening a fresh terminal and typing:
$ cd ~/catkin_ws/src/RoboND-Kinematics-Project/kuka_arm/scripts
$ ./safe_spawner.sh
Once Gazebo and rviz are up and running, make sure you see the following objects in the gazebo world and the rviz window:
Robot
Shelf
Blue cylindrical target in one of the shelves (not present in rviz)
Dropbox right next to the robot
We can now begin the demo. The steps are quite simple, just click on the Next
button on the bottom left corner of the rviz window to proceed from one state to another.
Notice how a neat little status message is displayed about the simulator state on top of the robot in rviz window. This status message changes as we move through the different stages of simulation.
First the robot is in idle state, clicking
Next
will create a plan for the robot from idle position to target location and display the plan.Clicking on
Next
again, will begin the robot motion towards the target_location. Note that in test mode, your code is responsible to perform this motion.Once the robot reaches the target_location, hitting the
Next
button will perform a reaching movement.Next
the gripper will close to grasp the target object.Once the object is grasped, we can hit
Next
to retract the arm and then plan for a motion towards the drop off location.In a similar fashion as before, the trajectory to the drop off location is displayed.
Next
robot starts motion towards the drop off location, again note that in test mode, your code will be responsible for this motion.Once the robot reaches the drop off location, we can finally open the gripper and drop the target into the bin. This signifies the completion of a single pick and place operation cycle.
Note that the planning framework creates a new plan with different trajectory points every time, even if the object is spawned at the same location.
In addition, you can also control the spawn location of the target object in the shelf.
To do this, modify the spawn_location
argument in target_description.launch
file under ~/catkin_ws/src/RoboND-Kinematics-Project/kuka_arm/launch/
0-9
are valid values for spawn_location with 0 being random mode.
Play around with this demo with different target locations to get a better understanding of all the steps involved, especially the step your code needs to perform in test mode.